import threading
import time


def task1():
    for i in range(10):
        print(f"task1-{threading.Thread.name}-{i}")
        time.sleep(0.1)


def task2():
    for i in range(8):
        print(f"task2-{threading.Thread.name}-{i}")
        time.sleep(0.1)


threading.Thread(target=task1).start()
threading.Thread(target=task2).start()

